package com.isoft.systemprovidor.controller.perinfor;

import com.isoft.systemprovidor.bean.ResponseData;
import com.isoft.systemprovidor.controller.BaseController;
import com.isoft.systemprovidor.entity.perinfor.Perinfor_Basic;
import com.isoft.systemprovidor.entity.perinfor.Perinfor_Documentinfo;
import com.isoft.systemprovidor.service.perinfor.Perinfor_Documentinfo_Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@Slf4j
@RequestMapping("/systemprovidor/perinfordocumentinfo")
public class Perinfor_Documentinfo_Controller extends BaseController {
    @Autowired
    Perinfor_Documentinfo_Service service;
    /*查看我的证件信息*/
    @GetMapping("/getdocumentinfo")
    public ResponseData selectDocumentinfo(String sysuserid){
        return service.selectDocumentinfo(sysuserid);
    }
    /*修改我的证件信息*/
    @PutMapping("/updatedocumentinfo")
    public ResponseData<Boolean> changeDocumentinfo(@RequestBody Perinfor_Documentinfo perinforDocumentinfo) {
        return returnBoolean(service.changeDocumentinfo(perinforDocumentinfo));
    }


    /*添加我的证件信息*/
    @PostMapping("/addmydocumentinfo")
    public ResponseData<Object> insertDocumentinfo(Perinfor_Documentinfo perinforDocumentinfo){
        return returnObject(service.insertDocumentinfo(perinforDocumentinfo));
    }

    /*删除自己个人基础信息*/
    @DeleteMapping("/deletedocumentinfo")
    public ResponseData<Boolean> deleteDocumentinfo(Integer id ,String sysuserid){
        return returnBoolean(service.deleteDocumentinfo(id , sysuserid));
    }

    /*证件文件上传*/
}
